<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Object Pool Allocator: Low-level interface</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Object Pool Allocator
   &#160;<span id="projectnumber">1.3.5.1.4.1.45340.1.1.2</span>
   </div>
   <div id="projectbrief">Space-reusing dynamic allocation in C.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Low-level interface</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structop__allocator__stats.html">op_allocator_stats</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stats for measuring and debugging allocators.  <a href="structop__allocator__stats.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gaca3524f014ef0a7ed9ba65273f61b685"><td class="memItemLeft" align="right" valign="top"><a id="gaca3524f014ef0a7ed9ba65273f61b685"></a>
typedef enum <a class="el" href="group__llinterface.html#ga27f4549e49590119789d18e1ff77e7c0">op_ll_allocator_mode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__llinterface.html#gaca3524f014ef0a7ed9ba65273f61b685">op_ll_allocator_mode</a></td></tr>
<tr class="memdesc:gaca3524f014ef0a7ed9ba65273f61b685"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocator mode handling. <br /></td></tr>
<tr class="separator:gaca3524f014ef0a7ed9ba65273f61b685"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9209b1a64c38a2148ea7c25dab8edd0f"><td class="memItemLeft" align="right" valign="top"><a id="ga9209b1a64c38a2148ea7c25dab8edd0f"></a>
typedef struct <a class="el" href="struct__op__allocator.html">_op_allocator</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__llinterface.html#ga9209b1a64c38a2148ea7c25dab8edd0f">op_allocator</a></td></tr>
<tr class="memdesc:ga9209b1a64c38a2148ea7c25dab8edd0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque allocator handle permitting multiple object pools. <br /></td></tr>
<tr class="separator:ga9209b1a64c38a2148ea7c25dab8edd0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad09821373eccfb78a54f20dbf5d4bdd2"><td class="memItemLeft" align="right" valign="top"><a id="gad09821373eccfb78a54f20dbf5d4bdd2"></a>
typedef struct <a class="el" href="structop__allocator__stats.html">op_allocator_stats</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__llinterface.html#gad09821373eccfb78a54f20dbf5d4bdd2">op_allocator_stats</a></td></tr>
<tr class="memdesc:gad09821373eccfb78a54f20dbf5d4bdd2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stats for measuring and debugging allocators. <br /></td></tr>
<tr class="separator:gad09821373eccfb78a54f20dbf5d4bdd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga27f4549e49590119789d18e1ff77e7c0"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__llinterface.html#ga27f4549e49590119789d18e1ff77e7c0">op_ll_allocator_mode</a> { <a class="el" href="group__llinterface.html#gga27f4549e49590119789d18e1ff77e7c0acd93e093157aa38ebc1a5b9633e7755e">OP_DOUBLING_INDIVIDUAL</a>, 
<a class="el" href="group__llinterface.html#gga27f4549e49590119789d18e1ff77e7c0a840daf6b7aadca424c38454f5755aa8c">OP_DOUBLING_CHUNK</a>, 
<a class="el" href="group__llinterface.html#gga27f4549e49590119789d18e1ff77e7c0af55c441a5deea02b96b61bdd18fb5aff">OP_LINEAR_INDIVIDUAL</a>, 
<a class="el" href="group__llinterface.html#gga27f4549e49590119789d18e1ff77e7c0aa7777bc69f8c511bd503ca7ac68a1096">OP_LINEAR_CHUNK</a>
 }<tr class="memdesc:ga27f4549e49590119789d18e1ff77e7c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocator mode handling.  <a href="group__llinterface.html#ga27f4549e49590119789d18e1ff77e7c0">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ga27f4549e49590119789d18e1ff77e7c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gac6ef31d67566dde5e73047c336b39740"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__llinterface.html#gac6ef31d67566dde5e73047c336b39740">op_error_handler</a> (const char *file, const int line, const char *error_message)</td></tr>
<tr class="memdesc:gac6ef31d67566dde5e73047c336b39740"><td class="mdescLeft">&#160;</td><td class="mdescRight">Error callback for allocator errors.  <a href="#gac6ef31d67566dde5e73047c336b39740">More...</a><br /></td></tr>
<tr class="separator:gac6ef31d67566dde5e73047c336b39740"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga92340cf30ad310a00d2f24ac2f480156"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__llinterface.html#ga92340cf30ad310a00d2f24ac2f480156">op_ll_allocate_object</a> (<a class="el" href="group__llinterface.html#ga9209b1a64c38a2148ea7c25dab8edd0f">op_allocator</a> allocator)</td></tr>
<tr class="memdesc:ga92340cf30ad310a00d2f24ac2f480156"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate an object in the given allocator context.  <a href="#ga92340cf30ad310a00d2f24ac2f480156">More...</a><br /></td></tr>
<tr class="separator:ga92340cf30ad310a00d2f24ac2f480156"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac5c6703fea3c0a2e39d07f4bfac031a8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__llinterface.html#gac5c6703fea3c0a2e39d07f4bfac031a8">op_ll_deallocate_object</a> (<a class="el" href="group__llinterface.html#ga9209b1a64c38a2148ea7c25dab8edd0f">op_allocator</a> allocator, const void *object)</td></tr>
<tr class="memdesc:gac5c6703fea3c0a2e39d07f4bfac031a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deallocate a specified object from the given allocator.  <a href="#gac5c6703fea3c0a2e39d07f4bfac031a8">More...</a><br /></td></tr>
<tr class="separator:gac5c6703fea3c0a2e39d07f4bfac031a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga278159fc6bbfb1c2e2513530cbee0e96"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__llinterface.html#ga278159fc6bbfb1c2e2513530cbee0e96">op_ll_deinitialize_allocator</a> (<a class="el" href="group__llinterface.html#ga9209b1a64c38a2148ea7c25dab8edd0f">op_allocator</a> allocator)</td></tr>
<tr class="memdesc:ga278159fc6bbfb1c2e2513530cbee0e96"><td class="mdescLeft">&#160;</td><td class="mdescRight">De-initialize an allocator, freeing any owned resources.  <a href="#ga278159fc6bbfb1c2e2513530cbee0e96">More...</a><br /></td></tr>
<tr class="separator:ga278159fc6bbfb1c2e2513530cbee0e96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa0d8acd3d49cc322551e0033f61bdaca"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structop__allocator__stats.html">op_allocator_stats</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__llinterface.html#gaa0d8acd3d49cc322551e0033f61bdaca">op_ll_get_allocator_stats</a> (const <a class="el" href="group__llinterface.html#ga9209b1a64c38a2148ea7c25dab8edd0f">op_allocator</a> allocator)</td></tr>
<tr class="memdesc:gaa0d8acd3d49cc322551e0033f61bdaca"><td class="mdescLeft">&#160;</td><td class="mdescRight">De-initialize an allocator, freeing any owned resources.  <a href="#gaa0d8acd3d49cc322551e0033f61bdaca">More...</a><br /></td></tr>
<tr class="separator:gaa0d8acd3d49cc322551e0033f61bdaca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf0ba071e1d766a1e7cb9ba7c40d5b4ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__llinterface.html#ga9209b1a64c38a2148ea7c25dab8edd0f">op_allocator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__llinterface.html#gaf0ba071e1d766a1e7cb9ba7c40d5b4ba">op_ll_initialize_allocator</a> (const size_t object_size, const size_t initial_count, const <a class="el" href="group__llinterface.html#ga27f4549e49590119789d18e1ff77e7c0">op_ll_allocator_mode</a> mode)</td></tr>
<tr class="memdesc:gaf0ba071e1d766a1e7cb9ba7c40d5b4ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize an allocator according to the provided configuration.  <a href="#gaf0ba071e1d766a1e7cb9ba7c40d5b4ba">More...</a><br /></td></tr>
<tr class="separator:gaf0ba071e1d766a1e7cb9ba7c40d5b4ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This is the nuts-and-bolts interface to the library. It is primarily used to implement the high level interface and the macro interface but has been exposed to enable end-users to make task-specific interfaces if they so choose.</p>
<p>It is strongly recommended not to use this interface directly as it is highly error-prone. </p>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga27f4549e49590119789d18e1ff77e7c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga27f4549e49590119789d18e1ff77e7c0">&#9670;&nbsp;</a></span>op_ll_allocator_mode</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__llinterface.html#ga27f4549e49590119789d18e1ff77e7c0">op_ll_allocator_mode</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocator mode handling. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga27f4549e49590119789d18e1ff77e7c0acd93e093157aa38ebc1a5b9633e7755e"></a>OP_DOUBLING_INDIVIDUAL&#160;</td><td class="fielddoc"><p>doubling growth, individual object allocation </p>
</td></tr>
<tr><td class="fieldname"><a id="gga27f4549e49590119789d18e1ff77e7c0a840daf6b7aadca424c38454f5755aa8c"></a>OP_DOUBLING_CHUNK&#160;</td><td class="fielddoc"><p>doubling growth, chunk object allocation </p>
</td></tr>
<tr><td class="fieldname"><a id="gga27f4549e49590119789d18e1ff77e7c0af55c441a5deea02b96b61bdd18fb5aff"></a>OP_LINEAR_INDIVIDUAL&#160;</td><td class="fielddoc"><p>linear growth, individual object allocation </p>
</td></tr>
<tr><td class="fieldname"><a id="gga27f4549e49590119789d18e1ff77e7c0aa7777bc69f8c511bd503ca7ac68a1096"></a>OP_LINEAR_CHUNK&#160;</td><td class="fielddoc"><p>linear growth, chunk object allocation </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gac6ef31d67566dde5e73047c336b39740"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac6ef31d67566dde5e73047c336b39740">&#9670;&nbsp;</a></span>op_error_handler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void op_error_handler </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>line</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>error_message</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Error callback for allocator errors. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">file</td><td>The source file where the error was discovered. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">line</td><td>The line of the file where the error was discovered. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">error_message</td><td>The error's textual message.</td></tr>
  </table>
  </dd>
</dl>
<p>A weakly-linked implementation is provided in case no special error handling is desired. </p>

</div>
</div>
<a id="ga92340cf30ad310a00d2f24ac2f480156"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga92340cf30ad310a00d2f24ac2f480156">&#9670;&nbsp;</a></span>op_ll_allocate_object()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* op_ll_allocate_object </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__llinterface.html#ga9209b1a64c38a2148ea7c25dab8edd0f">op_allocator</a>&#160;</td>
          <td class="paramname"><em>allocator</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocate an object in the given allocator context. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">allocator</td><td>The allocator from which the memory is to be allocated.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the memory space, NULL on failure.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The <code><a class="el" href="group__llinterface.html#gac6ef31d67566dde5e73047c336b39740" title="Error callback for allocator errors. ">op_error_handler()</a></code> callback is called before NULL is returned. </dd></dl>

</div>
</div>
<a id="gac5c6703fea3c0a2e39d07f4bfac031a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac5c6703fea3c0a2e39d07f4bfac031a8">&#9670;&nbsp;</a></span>op_ll_deallocate_object()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void op_ll_deallocate_object </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__llinterface.html#ga9209b1a64c38a2148ea7c25dab8edd0f">op_allocator</a>&#160;</td>
          <td class="paramname"><em>allocator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>object</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Deallocate a specified object from the given allocator. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">allocator</td><td>The allocator holding the object being freed. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">object</td><td>The object to be freed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga278159fc6bbfb1c2e2513530cbee0e96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga278159fc6bbfb1c2e2513530cbee0e96">&#9670;&nbsp;</a></span>op_ll_deinitialize_allocator()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void op_ll_deinitialize_allocator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__llinterface.html#ga9209b1a64c38a2148ea7c25dab8edd0f">op_allocator</a>&#160;</td>
          <td class="paramname"><em>allocator</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>De-initialize an allocator, freeing any owned resources. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">allocator</td><td>The allocator from which to free the object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>After returning, the allocator object is invalid and can no longer be used. </dd></dl>

</div>
</div>
<a id="gaa0d8acd3d49cc322551e0033f61bdaca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa0d8acd3d49cc322551e0033f61bdaca">&#9670;&nbsp;</a></span>op_ll_get_allocator_stats()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structop__allocator__stats.html">op_allocator_stats</a> op_ll_get_allocator_stats </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__llinterface.html#ga9209b1a64c38a2148ea7c25dab8edd0f">op_allocator</a>&#160;</td>
          <td class="paramname"><em>allocator</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>De-initialize an allocator, freeing any owned resources. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">allocator</td><td>The allocator to collect stats from.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A structure with some allocator statistics for measurement and debugging. </dd></dl>

</div>
</div>
<a id="gaf0ba071e1d766a1e7cb9ba7c40d5b4ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf0ba071e1d766a1e7cb9ba7c40d5b4ba">&#9670;&nbsp;</a></span>op_ll_initialize_allocator()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__llinterface.html#ga9209b1a64c38a2148ea7c25dab8edd0f">op_allocator</a> op_ll_initialize_allocator </td>
          <td>(</td>
          <td class="paramtype">const size_t&#160;</td>
          <td class="paramname"><em>object_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const size_t&#160;</td>
          <td class="paramname"><em>initial_count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__llinterface.html#ga27f4549e49590119789d18e1ff77e7c0">op_ll_allocator_mode</a>&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize an allocator according to the provided configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">object_size</td><td>The size each individual object requires in RAM. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">initial_count</td><td>The starting size of the allocator's array. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">use_chunks</td><td>Signals this allocator uses chunk allocation. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">use_linear</td><td>Signals this allocator uses linear growth.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An <code>op_allocator</code> handle used in subsequent operations or NULL on failure.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>1. If <code>use_chunks</code> is not provided, only the indirect array is calloced in the allocator. If <code>use_chunks</code> is provided, the first <code>initial_count</code> objects of <code>object_size</code> bytes are also allocated.<ol type="1">
<li>On failure NULL is returned, but <code><a class="el" href="group__llinterface.html#gac6ef31d67566dde5e73047c336b39740" title="Error callback for allocator errors. ">op_error_handler()</a></code> is called first. </li>
</ol>
</dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
